package com.xiaohong.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.sql.DataSource;

@RestController  //该注解相当于@Controller和@ResponseBody，表示这个Controller里的所有方法返回的都是jackson类型数据
@RequestMapping("/hello")
public class HelloController {
//
//    @Autowired
//    private DataSource dataSource;

    @GetMapping("show")
    public String test(){
        int a = 1/0;
        return "hello springboot 1";
    }
}
